dnl -*- mode: Autoconf; -*-

dnl -----------------------------------------------------------------------------------------
dnl checks for the MATH library
dnl -----------------------------------------------------------------------------------------

AC_MSG_NOTICE([--------------------------------------------------------------------------------])
AC_MSG_NOTICE([CHECKING FOR MATH])
AC_MSG_NOTICE([--------------------------------------------------------------------------------])

AC_LANG(C)

dnl -----------------------------------------------------------------------------------------
dnl check for library
dnl -----------------------------------------------------------------------------------------

AC_CHECK_LIB([m], [sincos], [MATH_LIBS="-lm"], )

dnl -----------------------------------------------------------------------------------------
dnl add substitutions
dnl -----------------------------------------------------------------------------------------

AC_SUBST(MATH_CPPFLAGS)
AC_SUBST(MATH_LDFLAGS)
AC_SUBST(MATH_LIBS)

dnl -----------------------------------------------------------------------------------------
dnl informational output
dnl -----------------------------------------------------------------------------------------

if test "x$tr_MATH" = xyes;  then
  FLAG_INFO="$FLAG_INFO|MATH_CPPFLAGS: ${MATH_CPPFLAGS}"
  FLAG_INFO="$FLAG_INFO|MATH_LDFLAGS:  ${MATH_LDFLAGS}"
  FLAG_INFO="$FLAG_INFO|MATH_LIBS:     ${MATH_LIBS}"
fi

dnl Local Variables:
dnl mode: outline-minor
dnl outline-regexp: "^\\(dnl --SECTION--\\)"
dnl End:
